package com.yzd.learnjava.arrays;

import java.util.Arrays;

import com.yzd.learnjava.util.ConvertTo;
import com.yzd.learnjava.util.CountingGenerator;
import com.yzd.learnjava.util.Generated;
import com.yzd.learnjava.util.Print;
import com.yzd.learnjava.util.RandomGenerator;

public class TestArrayGeneration {
	public static void main(String[] args) {
		int size = 6;
		boolean[] a1 = ConvertTo.primitive(Generated.array(
				Boolean.class, 
				new RandomGenerator.Boolean(),
				size));
		Print.print("a1 = " + Arrays.toString(a1));
		
		byte[] a2 = ConvertTo.primitive(Generated.array(
				Byte.class, 
				new RandomGenerator.Byte(),
				size));
		Print.print("a2 = " + Arrays.toString(a2));
		
		char[] a3 = ConvertTo.primitive(Generated.array(
				Character.class, 
				new RandomGenerator.Character(),
				size));
		Print.print("a3 = " + Arrays.toString(a3));
		
		short[] a4 = ConvertTo.primitive(Generated.array(
				Short.class, 
				new RandomGenerator.Short(),
				size));
		Print.print("a4 = " + Arrays.toString(a4));
		
		int[] a5 = ConvertTo.primitive(Generated.array(
				Integer.class, 
				new RandomGenerator.Integer(),
				size));
		Print.print("a5 = " + Arrays.toString(a5));
		
		long[] a6 = ConvertTo.primitive(Generated.array(
				Long.class, 
				new RandomGenerator.Long(),
				size));
		Print.print("a6 = " + Arrays.toString(a6));
		
		float[] a7 = ConvertTo.primitive(Generated.array(
				Float.class, 
				new RandomGenerator.Float(),
				size));
		Print.print("a7 = " + Arrays.toString(a7));
		
		double[] a8 = ConvertTo.primitive(Generated.array(
				Double.class, 
				new RandomGenerator.Double(),
				size));
		Print.print("a8 = " + Arrays.toString(a8));
	}
}
